package org.dong.service.Impl;

import org.dong.mapper.ReportMapper;
import org.dong.pojo.Report;
import org.dong.service.ReportService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional
public class ReportServiceImpl implements ReportService {
    @Resource
    ReportMapper reportMapper;
    @Override
    public Report getReportInfo(Integer id,Integer orderId, Integer subjectId,Integer projectId) {
        return reportMapper.getReportInfo(id,orderId, subjectId,projectId);
    }

    @Override
    public Integer updateReportInfo(Integer id, int status, String content) {
        return reportMapper.updateReportInfo(id, status,content );
    }


    @Override
    public Integer addReport(Report report) {

        //生成报告
        return reportMapper.addReport(report);

    }

    @Override
    public List<Report> getReportList(int page, int doctorId,String startTime,String endTime,String sName,String sProject) {
        return reportMapper.getReportList(page,doctorId,startTime,endTime,sName,sProject);
    }

    @Override
    public Integer getReportListCount(int doctorId, String startTime, String endTime, String sName, String sProject) {
        return reportMapper.getReportListCount(doctorId, startTime, endTime, sName, sProject);
    }
}
